package com.ardan1.client.validation;

import javax.validation.Validator;
import javax.validation.groups.Default;

import com.ardan1.shared.Person;
import com.google.gwt.core.client.GWT;
import com.google.gwt.validation.client.AbstractGwtValidatorFactory;
import com.google.gwt.validation.client.GwtValidation;
import com.google.gwt.validation.client.impl.AbstractGwtValidator;

public final class ValidatorFactory extends AbstractGwtValidatorFactory {
    @GwtValidation(value = { Person.class }, groups = {Default.class, ClientGroup.class})
    public interface GwtValidator extends Validator {
    }

    @Override
    public AbstractGwtValidator createValidator() {
        return GWT.create(GwtValidator.class);
    }
}
